<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePositionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('position', function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer ('user_id')->default(0)->comment('用户id');
            $table->integer('type')->default(0)->comment('职位类型,0:全职，1:兼职，2:实习');
            $table->integer('job_type_id')->default(0)->comment('职位类型id');
            $table->integer('people_num')->default(0)->comment('招聘人数');
            $table->timestamp('start_time')->nullable()->comment('招聘开始时间');
            $table->timestamp('end_time')->nullable()->comment('招聘结束时间');
            $table->string('salary_type')->nullable()->comment('薪资类型');
            $table->integer('salary_num')->default(0)->comment('薪资金额');
            $table->string('contact_phone')->nullable()->comment('联系手机号码');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('城市');
            $table->string('area')->nullable()->comment('地区');
            $table->string('address_detail')->nullable()->comment('详细地址');
            $table->text('desc')->nullable()->comment('职位描述');
            $table->integer('set_top')->default(0)->comment('是否置顶0:未置顶1：已置顶');
            $table->integer('set_top_time')->default(0)->comment('置顶小时数');
            $table->integer('sort')->default(0)->comment('排序');
            $table->integer('state')->default(0)->comment('职位状态0:等待招聘1：招聘中');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
